#!/bin/bash

if [ $# -ne 2 ];then
    echo "no start or end"
    exit 1
fi

start=$1
end=$2
sum=0

for (( i=start;i<=end;i++ ))
do
    if [ $((i%2)) -eq 0 ];then
        sum=$((sum+i))
    fi
done

echo "ans : $sum"

